#ifndef PICSHOW_H
#define PICSHOW_H

#include <QDialog>
#include <QGraphicsOpacityEffect>
#include <QPropertyAnimation>

namespace Ui {
class PicShow;
}

class PicShow : public QDialog
{
    Q_OBJECT

public:
    explicit PicShow(QWidget *parent = nullptr);
    ~PicShow();
    void ReloadPic();
protected:
    bool event(QEvent *event) override;
private:
    void ShowPreNextBtns(bool b_show);//设置按钮是否可见
    Ui::PicShow *ui;
    QPropertyAnimation* _animation_show_pre;
    QPropertyAnimation* _animation_show_next;
    bool _b_btnvisible;//记录按钮当前是否可见的状态
public slots:
    void SlotSelectItem(const QString& path);
    void SlotUpdatePic(const QString& path);
    void SlotDeleteItem();
private:
    QString _selected_path;//存储选择的路径
    QPixmap _pix_map;//存储图片
signals:
    void SigPreClicked();
    void SigNextClicked();
};

#endif // PICSHOW_H
